package com.hsgene.order.condition;

import com.hsgene.common.util.date.SimpleDateUtils;
import org.apache.commons.lang.StringUtils;

import java.util.Date;

/**
 * 退款列表查询条件
 *
 * @author wangbing
 * @version 1.0, 2018/11/13
 */
public class OrderRefundCondition {

    /**
     * 订单编号
     */
    private String orderNo;

    /**
     * 退款编号
     */
    private String refundNo;

    /**
     * 检测人姓名模糊查询
     */
    private String patientName;

    /**
     * 开始时间
     */
    private Date beginDataTime;

    /**
     * 截止时间
     */
    private Date endDateTime;

    /**
     * 删除标志
     */
    private Integer deleteFlag;

    /**
     * 排序字段
     */
    private String sortField;

    /**
     * 排序类型
     */
    private String sortType;

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getRefundNo() {
        return refundNo;
    }

    public void setRefundNo(String refundNo) {
        this.refundNo = refundNo;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public Date getBeginDataTime() {
        return beginDataTime;
    }

    public void setBeginDataTime(Date beginDataTime) {
        this.beginDataTime = beginDataTime;
    }

    public void setBeginDataTime(String beginDataTimeStr) {
        if (StringUtils.isNotBlank(beginDataTimeStr)) {
            this.beginDataTime = SimpleDateUtils.getDateOfMidNight(SimpleDateUtils.parseDate(beginDataTimeStr, SimpleDateUtils.DatePattern.YYYY_MM_DD.toString()));
        }
    }

    public Date getEndDateTime() {
        return endDateTime;
    }

    public void setEndDateTime(Date endDateTime) {
        this.endDateTime = endDateTime;
    }

    public void setEndDateTime(String endDateTimeStr) {
        if (StringUtils.isNotBlank(endDateTimeStr)) {
            this.endDateTime = SimpleDateUtils.getDateOfTodayEnd(SimpleDateUtils.parseDate(endDateTimeStr, SimpleDateUtils.DatePattern.YYYY_MM_DD.toString()));
        }
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getSortField() {
        return sortField;
    }

    public void setSortField(String sortField) {
        this.sortField = sortField;
    }

    public String getSortType() {
        return sortType;
    }

    public void setSortType(String sortType) {
        this.sortType = sortType;
    }
}
